import Vue from 'vue'
import Vuex, { Store } from 'vuex'
// 使用
Vue.use(Vuex)
// 创建Store实例
const store = new Store({
  state: {
    count: 100
  },
  mutations: {
    add (state) {
      state.count++
    },
    reduce (state) {
      state.count--
    }
  }
})

export default store
